home *** CD-ROM | disk | FTP | other *** search
- From: cmoore@msn.com (Carl S. Moore)
- Subject: C++ 4.5 CanClose
- Date: 3 Feb 96 04:17:30 -0800
- Message-ID: <00001a81+000098f8@msn.com>
- Path: news.msn.com!msn.com
- Newsgroups: comp.lang.c++
- Organization: The Microsoft Network (msn.com)
-
- I'd like some help here on a seemingly simple question.... After
- upgrading to BC++ 4.5, I'm having some trouble with some things.
- I'm relatively novice at this so bear with it.
-
- I have the following, where a menu item calls Exitgame, and then it
- brings up the CanClose box. It doesn't seem to respond to the
- CanClose through this menu exit, but the CanClose does work when I
- terminate the window by clicking on the upper left corner etc. (ie,
- doesn't route through Exitgame).
-
- thanks, carl
-
-
- void TMyWindow::Exitgame()
- {
- TMyWindow::CanClose();
- }
-
-
- BOOL TMyWindow::CanClose()
- {
- return BWCCMessageBox(HWindow, " GAMENAME Are
- you sure you want to Exit?",
- "Exit?", MB_YESNO | MB_ICONQUESTION) == IDYES;
-
- }
-